package com.gxuwz.stats.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxuwz.stats.entity.ScientificActivity;
import lombok.Data;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.Date;

@Mapper
public interface ScientificActivityMapper extends BaseMapper<ScientificActivity> {

    @Insert("INSERT INTO rsp_research_platform " +
            "(user_id, scientific_work_name, scientific_publisher, scientific_publish_date, scientific_isbn, scientific_category, scientific_article_count, scientific_score, scientific_notes) " +
            "VALUES " +
            "(#{userId}, #{scientificWorkName}, #{scientificPublisher}, #{scientificPublishDate}, #{scientificIsbn}, #{scientificCategory}, #{scientificArticleCount}, #{scientificScore}, #{scientificNotes})")
    int insertWithUserId(ScientificActivity scientificActivity);
    /**
     * 二级学院管理员-查询
     * @param page
     * @param department
     * @param username
     * @param scientificWorkName
     * @param scientificCategory
     * @param scientificIsbn
     * @param scientificPublishDate
     * @param scientificPublisher
     * @return
     */
    IPage<ScientificActivity> getTwoAdminScienAcList(
            @Param("page") IPage<ScientificActivity> page,
            @Param("department") String department,
            @Param("username") String username,
            @Param("scientificWorkName") String scientificWorkName,
            @Param("scientificCategory") String scientificCategory,
            @Param("scientificIsbn") String scientificIsbn,
            @Param("scientificPublishDate") LocalDate scientificPublishDate,
            @Param("scientificPublisher") String scientificPublisher);

}
